///*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
//package com.searchbook.keywordswidget;
//
//import android.app.Service;
//import android.appwidget.AppWidgetManager;
//import android.content.ComponentName;
//import android.content.Context;
//import android.content.Intent;
//import android.os.Bundle;
//import android.os.Handler;
//import android.os.IBinder;
//import android.widget.EditText;
//import android.widget.ListView;
//import android.widget.RemoteViews;
//import com.searchbook.KeywordsActivity;
//import com.searchbook.keywordsfetch.MyRunnable;
//import com.searchbook.keywordsfetch.Suggestion;
//
//public class UpdateService extends Service {
//	private AppWidgetManager appWidgetManager;
//	private Context context;
//	private Handler myHandler;
//	private MyRunnable myRunable;
//
//	private void handle(Intent paramIntent) {
//		Bundle localBundle = paramIntent.getExtras();
//		if (localBundle == null)
//			return;
//		RemoteViews localRemoteViews = new RemoteViews(
//				this.context.getPackageName(), ToolWidget.getLayoutResIDByName(
//						this.context, "searchsdk_search_widget"));
//		int i = localBundle.getInt("ResourceId");
//		if (i == ToolWidget.getIdResIDByName(this.context,
//				"searchsdk_widget_img2")) {
//			ToolWidget.setRemoteView(this.context, localRemoteViews);
//			Suggestion.getSuggest(null, this.myRunable, this.myHandler, true);
//		}
//		do
//			while (true) {
//				localRemoteViews
//						.setOnClickPendingIntent(
//								ToolWidget.getIdResIDByName(this.context,
//										"searchsdk_appwidget_ic_search1"),
//								ToolWidget
//										.getPressPendingIntent(
//												this.context,
//												ToolWidget
//														.getIdResIDByName(
//																this.context,
//																"searchsdk_appwidget_ic_search1"),
//												100));
//				localRemoteViews.setOnClickPendingIntent(
//						ToolWidget.getIdResIDByName(this.context,
//								"searchsdk_widget_img2"), ToolWidget
//								.getPressPendingIntent(this.context, ToolWidget
//										.getIdResIDByName(this.context,
//												"searchsdk_widget_img2"), 101));
//				ComponentName localComponentName = new ComponentName(this,
//						ExampleAppWidgetProvider.class);
//				this.appWidgetManager.updateAppWidget(localComponentName,
//						localRemoteViews);
//				return;
//				if (i != ToolWidget.getIdResIDByName(this.context,
//						"searchsdk_appwidget_ic_search1"))
//					break;
//				Intent localIntent = new Intent(this.context,
//						KeywordsActivity.class);
//				localIntent.setFlags(268435456);
//				startActivity(localIntent);
//			}
//		while (i != ToolWidget.getIdResIDByName(this.context,
//				"searchsdk_textarea"));
//		String str = localBundle.getString("TextViewContent");
//		ToolWidget.openBrowser(this.context, str);
//	}
//
//	public IBinder onBind(Intent paramIntent) {
//		return null;
//	}
//
//	public void onCreate() {
//		this.context = getApplicationContext();
//		this.appWidgetManager = AppWidgetManager.getInstance(this.context);
//		this.myHandler = new Handler();
//		EditText localEditText = new EditText(getApplicationContext());
//		ListView localListView = new ListView(getApplicationContext());
//		this.myRunable = new MyRunnable(this, this.myHandler, localEditText,
//				localListView);
//		super.onCreate();
//	}
//
//	public int onStartCommand(Intent paramIntent, int paramInt1, int paramInt2) {
//		if (paramIntent == null)
//			return 2;
//		handle(paramIntent);
//		return 2;
//	}
//}